use Auth; $user_id = Auth::user()->id;
$id = Auth::user()->id;print_r($id);
// Get the currently authenticated user's ID... $id = Auth::id();
$userId = Auth::id();